/**
 * @param {String} url
 * @description 从URL中解析参数
 */
export const getParams = (url:string) => {
    if (!url.split('?')[1]){
        return false
    }
    const keyValueArr = url.split('?')[1].split('&')
    let paramObj = {} as any
    keyValueArr.forEach(item => {
      const keyValue = item.split('=')
      paramObj[keyValue[0]] = keyValue[1]
    })
    return paramObj
  }